import { Language } from "../../enum";
import { TextPrompt } from "../base";
import { baseTemplate } from "./baseTemplate";
import { codeTemplate } from "./codeTemplate";
import { projectParsingTemplate } from "./projectParsingTemplate";

export const promptTemplateDict = {
    baseTemplate,
    codeTemplate,
    projectParsingTemplate
};

/**
 * 获取指定语言的文本提示模板
 * @param key 关键字
 * @param language 语言
 * @returns 指定语言的文本提示模板
 */
export function getPromptFromKey(
    prompt: Record<Language, string>,
    language: Language = Language.Chinese
): TextPrompt {
    return new TextPrompt(prompt[language]);
}
